import http from '../../utils/request'
//部门分页查询接口
export const getDepartmentPageData =(params) =>{
    return http.get('/depart',
        {params}).then(reponse =>{
        return reponse.data.departmentPaasPage;
    }).catch(error => {
        console.error(error);
    });
}
//部门查询接口
export const getDepartmentListData =(params) =>{
    return http.get('/depart/list',
        {params}).then(reponse =>{
        return reponse.data.departmentList;
    }).catch(error => {
        console.error(error);
    });
}

export const delDepartment =(params) =>{
    var id = params.id;
    return http.post('/depart/d/'+id).then(response =>{
        return response;
    })
}

export const addDepartment =(params) =>{
    return http.post('/depart',params).then(response =>{
        return response;
    })
}
